package com.hhkj.admin.student.controller;

import com.hhkj.admin.student.domain.StudentCourseTrainCount;
import com.hhkj.admin.student.service.base.TrainCountService;
import com.hhkj.admin.student.service.biz.TrainCountBizService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学员培训历史 Controller
 *
 * @author ruoyi
 * @since 2023-05-30
 */
@RestController
@RequestMapping("/student/train/history")
public class StudentTrainHistoryController extends BaseController {
    @Autowired
    private TrainCountBizService trainCountBizService;

    /**
     * 分页查询培训详情
     *
     * @return 登录日志
     */
    @PreAuthorize("@ss.hasPermi('student:history:page')")
    @PostMapping("/page")
    public TableDataInfo page(@RequestBody StudentCourseTrainCount trainCount) {
        startPageBody(trainCount);
        return getDataTable(trainCountBizService.pageTrainDetail(trainCount));
    }
}
